package com.xxmw.transaction.model.brick;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author: yamoo
 * @Date: 2020-02-27 19:09
 **/
@Data
@TableName(value = "brick")
public class Brick {

    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 标题
     */
    private String title;

    /**
     * 交易对
     */
    private String symbol;

    /**
     * 最小利润率 当利润率大于等于该值才会搬砖
     */
    private BigDecimal minProfitMargin;

    /**
     * 挂单数量
     */
    private BigDecimal tradeNum;

    /**
     * 状态 1 关闭  2 开启
     */
    private Integer status;

    /**
     * 效率
     */
    private String rate;

    /**
     * 描述
     */
    private String description;

    public enum Status {
        /**
         * 关闭
         */
        CLOSE(1,"关闭"),
        /**
         * 开启
         */
        OPEN(2,"开启");

        private Integer value;

        private String msg;

        Status (Integer value, String msg) {
            this.value = value;
            this.msg = msg;
        }

        public Integer value () {
            return this.value;
        }

        public String msg () {
            return this.msg;
        }
    }
}
